﻿using System;
using Gp.Scripts.Core;
using UnityEngine;

namespace Gp.Scripts.GameLogic {
    /// <summary>
    /// 电梯对象。在玩家进入区域内时，会将父物体设置为此对象
    /// </summary>
    public class ElevatorObject : TransDynamicObject {
        private bool PlayerInside { get; set; }

        // private void OnTriggerEnter(Collider other) {
        //     if (!ObjectHelper.IsPlayer(other.gameObject)) return;
        //     PlayerRoot.Instance.UnParent(transform);
        //     PlayerInside = true;
        // }
        //
        //
        // private void OnTriggerExit(Collider other) {
        //     if (!ObjectHelper.IsPlayer(other.gameObject)) return;
        //     PlayerRoot.Instance.ReParent();
        //     PlayerInside = false;
        // }
        //
        //
        // protected override void OnDestroy() {
        //     base.OnDestroy();
        //     if (PlayerInside) PlayerRoot.Instance.ReParent();
        // }
    }
}